use ATS
alter table [TTest] add MaxPhase float null
alter table [TTest] add MaxAm float null
alter table [TTest] add MaxInsertloss float null
alter table [TTest] add MaxMag float null
alter table [TTest] add UserID2 nvarchar(50) null

alter table [TTestItem] add Phase decimal(18,4) null
alter table [TTestItem] add PhaseOffest decimal(18,4) null
alter table [TTestItem] add Mag decimal(18,4) null
alter table [TTestItem] add Am decimal(18,4) null
alter table [TTestItem] add Insertloss decimal(18,4) null
alter table [TTestItem] add FrePoint nvarchar(200) null



alter table [PIMTest] add UserID2 nvarchar(50) null


ALTER TABLE [tb_MOIDConfig] ALTER COLUMN [PIM_Select] VARCHAR(8000)
ALTER TABLE [tb_MOIDConfig] ALTER COLUMN [ELEC_Select] VARCHAR(8000)



USE [ATS]
CREATE TABLE [dbo].[TTestTemp](
	[ProductSN] [nvarchar](50) NOT NULL,
	[RecordTime] [datetime] NULL,
	[ProductTypeID] [nvarchar](50) NULL,
	[MOID] [nvarchar](50) NULL,
	[UserID] [nvarchar](20) NULL,
	[ENAID] [nvarchar](50) NULL,
	[TestStep] [nvarchar](50) NULL,
	[MaxVSWR] [float] NULL,
	[MaxISO] [float] NULL,
	[IsPass] [nvarchar](10) NULL,
	[IsSwitch] [nvarchar](10) NULL,
	[ShiftTime] [nvarchar](50) NULL,
	[MaxPhase] [float] NULL,
	[MaxAm] [float] NULL,
	[MaxInsertloss] [float] NULL,
	[MaxMag] [float] NULL,
	[UserID2] [nvarchar](50) NULL,
	[TestType] [nvarchar](50) NULL,
	[Effective] [nvarchar](10) NULL
) ON [PRIMARY]
GO

USE [ATS]
CREATE TABLE [dbo].[TTestItemTemp](
	[ProductSN] [nvarchar](50) NOT NULL,
	[RecordTime] [datetime] NOT NULL,
	[TestItemName] [nvarchar](50) NULL,
	[TestTypeName] [nvarchar](50) NULL,
	[StartF] [decimal](18, 4) NULL,
	[StopF] [decimal](18, 4) NULL,
	[VSWR] [decimal](18, 4) NULL,
	[ISO] [decimal](18, 4) NULL,
	[HighSpec] [decimal](18, 4) NULL,
	[LowSpec] [decimal](18, 4) NULL,
	[IsPass] [nvarchar](10) NULL,
	[TestAngle] [nvarchar](50) NOT NULL,
	[TestBand] [nvarchar](max) NULL,
	[Phase] [decimal](18, 4) NULL,
	[PhaseOffest] [decimal](18, 4) NULL,
	[Mag] [decimal](18, 4) NULL,
	[Am] [decimal](18, 4) NULL,
	[Insertloss] [decimal](18, 4) NULL,
	[FrePoint] [nvarchar](200) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



